const sequelize = require("./dbConn.js");

function initTables() {
  return new Promise((resolve, reject) => {
    // 建表
    sequelize.sync().then(
      () => {
        console.log("[初始化]表创建成功");
        resolve();
      },
      err => {
        console.log("[初始化]表创建失败");
        reject(err);
      }
    );
  });
}

module.exports = {
  initTables
};
